import request from "@/utils/request";

const BaseUrl = "/api/common"

// 获取验证码
export function userGetCode(){
    return request({
        url: BaseUrl +  '/getCode',
        method: 'get',
    })
}

// 用户注册
export function userRegister(data: any){
    return request({
        url: BaseUrl +  '/register',
        method: 'post',
        data:data,
    })
}

// 登录
export function userLogin(data: any){
    return request({
        url: BaseUrl +  '/login',
        method: 'post',
        data:data,
    })
}


// 用户退出登录
export function userQuit(id: any){
    return request({
        url: BaseUrl +  '/quit',
        method: 'post',
        params: {
            id: id,
        }
    })
}